package com.cloudcc.mobile.dao.impl;

import java.net.URLEncoder;

import com.cloudcc.mobile.AppContext;
import com.cloudcc.mobile.dao.AddMicroCommentDao;
import com.cloudcc.mobile.util.NetWork;
import com.cloudcc.mobile.util.Tools;
import com.cloudcc.mobile.util.UrlTools;

public class AddMicroCommentDaoImpl implements AddMicroCommentDao{

	/** 发布评论(回复) *  */
	@Override
	public String addMicroComment(String date) {
		String jsonstring=null;
		try {
			String Data=URLEncoder.encode(date, "utf-8");
			String url=UrlTools.url+UrlTools.url_path+"serviceName="+AppContext.ADDMICCOMMENT+"&data="+Data+"&binding="+AppContext.binding;
			jsonstring=NetWork.get(url.trim());
		} catch (Exception e) {
			Tools.handle(e);
		}
		return jsonstring;
	}

	@Override
	public String shanchucomment(String date) {
		String jsonstring=null;
		try {
			String Data=URLEncoder.encode(date, "utf-8");
			String url=UrlTools.url+UrlTools.url_path+"serviceName=removeMicroComment&data="+Data+"&binding="+AppContext.binding;
			jsonstring=NetWork.get(url.trim());
		} catch (Exception e) {
			Tools.handle(e);
		}
		return jsonstring;
	}
}
